Skip to content

feat(compreface): support config reload#1271

Merged
roflcoopter merged 1 commit intodevfrom
feature/compreface-reload
Mar 6, 2026
Merged

feat(compreface): support config reload#1271
roflcoopter merged 1 commit intodevfrom
feature/compreface-reload

Conversation

@roflcoopter
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 6, 2026 18:48
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 6, 2026

Deploy Preview for viseron canceled.

Name Link
🔨 Latest commit a81bfaf
🔍 Latest deploy log https://app.netlify.com/projects/viseron/deploys/69ab2178edc4e10008ab4c34

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the CompreFace face recognition integration to better support configuration reloads, primarily by adding an explicit component unload path and tightening typing/import patterns to reduce runtime import overhead and improve clarity.

Changes:

  • Add unload(vis) to the compreface component to clean up vis.data on component unload/reload.
  • Make AbstractFaceRecognition.__init__’s generate_entities keyword-only and update CompreFace accordingly.
  • Type-hint and import hygiene improvements (move runtime-unneeded imports under TYPE_CHECKING, add/adjust return annotations, switch to LOGGER.exception).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
viseron/domains/face_recognition/binary_sensor.py Minor typing/formatting cleanup for entity attributes.
viseron/domains/face_recognition/init.py Make generate_entities keyword-only; typing improvements and TYPE_CHECKING import moves.
viseron/components/compreface/face_recognition.py Update for new generate_entities calling style; entity registration args aligned with face_recognition domain; improved exception logging and typing/import hygiene.
viseron/components/compreface/init.py Add component unload() implementation and minor iteration simplification for camera identifiers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@roflcoopter roflcoopter merged commit 7d029a4 into dev Mar 6, 2026
21 checks passed
@roflcoopter roflcoopter deleted the feature/compreface-reload branch March 6, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants